//index.js
//获取应用实例
var app = getApp()
Page({

  data: {
    userInfo: {},
    authCode: {},
    studentId:'',
    password:''
  },


  skipToOrders: function (e) {
      console.log("1")
      wx.navigateTo({
          url: '../orders/orders'
      })
  },

  onLoad: function () {
      console.log('onLoad')
      var that = this
      //调用应用实例的方法获取全局数据
      app.getUserInfo(function (userInfo) {
          //更新数据
      console.log("1");
          that.setData({
              userInfo: userInfo
          })
      })
  }
})
